/*
 * @Author: nexox 2685853507@qq.com
 * @Date: 2024-11-26 10:32:53
 * @LastEditors: nexox 2685853507@qq.com
 * @LastEditTime: 2024-11-26 10:39:21
 * @FilePath: \pytorch_workplace\matrix\w12\kh1.cpp
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
#include <stdio.h>
#include <string.h>

int num(char *s,int i) {
    return (s[i] - '0') * 100 + (s[i + 1] - '0') * 10 + (s[i + 2] - '0');
}

#define MAX_SIZE 1005 // Maximum string size
void findMaxNumber(char *s, int len, int *start) {
    int mx = 0;
    // auto num = [s](int i) { return (s[i] - '0') * 100 + (s[i + 1] - '0') * 10 + (s[i + 2] - '0'); };
    for (int i = 0; i < len - 2; i++) {
        if (num(s,i) > mx) {
            mx = num(s,i);
            *start = i;
        }
    }
}

void removeNumber(char *s, int len, int start) {
    for (int i = start; i < len - 2; i++) {
        s[i] = s[i + 3];
    }
    s[len - 2] = '\0';
}
char s[MAX_SIZE];
int main() {
    scanf("%s", s);

    int len = strlen(s);
    int start = 0;
    findMaxNumber(s, len, &start);
    removeNumber(s, len, start);

    printf("%s\n", s);

    return 0;
}